﻿@using ECGadmin.WebUI.CustomHelpers
@using ECGadmin.WebUI.Models
@model ECGadmin.Common.TemplateDto
@{
    ViewBag.Title = "Thêm Template danh mục";
    Layout = "~/Views/Shared/_layout.cshtml";
}

<nav>
    <div id="jCrumbs" class="breadCrumb module">
        <ul>
            <li><a href="@Url.Action("Index", "Home")"><i class="bootstrap icon-home"></i></a></li>
            <li><a href="@Url.Action("TemplateList", "ProductCategory")">Danh sách template</a></li>
            <li><a href="javascript:void(0);">Thêm template danh mục</a></li>
        </ul>
    </div>
</nav>

<div class="toolBox">
    @Html.ToolBox(new List<object> { new Add { ClassCss = "Add", ActionName = "Javascript:void(0)" }  })
</div>

@using (Html.BeginForm("AddTemplateCategory", "ProductCategory", FormMethod.Post))
{
    <div class="box-Info">
        <div class="Info-header">
            <span>Thêm template mới</span>
        </div>

        <div class="Info-body ib-infopro">
            <div>@Html.ValidationMessage("ErrorSummary")</div>
            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="table-info">
                <tr>
                    <td class="tInfoLeft">
                        Mô tả template
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Description)
                        @Html.ValidationMessageFor(m => m.Description)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Nội dung template
                    </td>
                    <td class="tInfoRight">
                        @Html.TextAreaFor(m => m.TempContent, new { rows = 30, @class = "w-90-percent" })
                        @Html.ValidationMessageFor(m => m.TempContent)
                    </td>
                </tr>
            </table>
        </div>
    </div>
}

@section scripts
{
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script>
        SubmitFormUseToolBox($('ul li.Add a'), $('form'));
    </script>
}
